package com.bizihang.security.core.validate.code.image;


import com.bizihang.security.core.validate.code.ValidateCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * 图片验证码对象
 *
 * @author 毕子航 951755883@qq.com
 * @date 2018/08/17
 */
public class ImageCode extends ValidateCode {
	BufferedImage image;

	/**
	 * @param image        图片
	 * @param code         随机码
	 * @param expireSecond 过期的秒数
	 */
	public ImageCode(BufferedImage image, String code, int expireSecond) {
		super(code, expireSecond);
		this.image = image;
	}

	/**
	 * @param image      图片
	 * @param code       随机码
	 * @param expireTime 过期的时间
	 */
	public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
		super(code, expireTime);
		this.image = image;
	}

	public BufferedImage getImage() {
		return image;
	}
}
